package com.cuit.demo2.service;
import com.cuit.demo2.dao.UserRepositorey;
import com.cuit.demo2.entity.User;
import com.cuit.demo2.util.MD5Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserRepositorey userRepositorey;
    @Override
    public User checkUser(String username, String password){
        User user = userRepositorey.findByUsernameAndPassword(username, MD5Utils.code(password)); ;
    return user;
    }
}
